package cn.tedu.zx.order.adapter.schedule;

import cn.tedu.zx.order.service.BookingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class AcheScheduled {
    @Autowired
    BookingService bookingService;

    public AcheScheduled() {
        log.debug("启动定时任务管理");
    }

    @Scheduled(cron = "0 0 8,10,12,14,16,18,20,22 * * ?")
    private void setFinish(){
        bookingService.setFinish();
    }
}
